﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;
using Brushes = System.Drawing.Brushes;

namespace Clipboard.Tools
{
    public class KeyToColorConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            if (values.Length == 2 && values[0] is int key &&  (int)values[1] is int currentSortType)
            {
                return key == currentSortType ? new SolidColorBrush(Color.FromArgb(255, 37, 84, 173)) : new SolidColorBrush(Colors.Black); // 默认颜色
            }
            return new SolidColorBrush(Colors.Black); // 默认颜色
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
}
